package com.java.elastic.aspect;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.client.elc.ElasticsearchConfiguration;


/**
 * @author xuweizhi
 */
@Configuration
@SuppressWarnings("all")
public class RestClientConfig extends ElasticsearchConfiguration {

    @Override
    public ClientConfiguration clientConfiguration() {
        return ClientConfiguration.builder()
                .connectedTo("127.0.0.1:9200", "127.0.0.1:9201", "127.0.0.1:9202")
                .withBasicAuth("elastic", "elastic")
                .build();
    }
}
